/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */
package io.renren.modules.sys.service

import com.baomidou.mybatisplus.extension.service.IService
import io.renren.modules.sys.entity.SysCaptchaEntity
import java.awt.image.BufferedImage

/**
 * 验证码
 *
 * @author Mark sunlightcs@gmail.com
 */
interface SysCaptchaService : IService<SysCaptchaEntity?> {
    /**
     * 获取图片验证码
     */
    fun getCaptcha(uuid: String?): BufferedImage?

    /**
     * 验证码效验
     * @param uuid  uuid
     * @param code  验证码
     * @return  true：成功  false：失败
     */
    fun validate(uuid: String?, code: String?): Boolean
}